<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
	<title>群组管理</title>
	<style>
		.cluster_style{
			color: #bbb;
			font-size: 13px;
		}
	</style>
</head>

<link href="/pages/common/layui/css/layui.css" rel="stylesheet"  media="all">
<body>

		<!-- 群组消息统计 -->
		<div id="groupMsgChart" style="display: none;">
			<div class="layui-col-sm12">
	      		<div class="layui-card">
		        <div class="layui-card-header" style="height: 52px;">
		          	<div class="layui-form" style="min-width: 400px;max-height: 30px;display: inline-flex; margin-top: 8px;">
					  <div class="layui-form-item">
					    <div class="layui-inline">
					      <label class="layui-form-label" style="padding: 9px 8px">时间范围</label>
					      <div class="layui-input-inline">
					        <input class="layui-input" id="groupMsgDate" placeholder=" - " type="text">
					      </div>
					    </div>
					  </div>
				  	<div class="layui-form-item" >
					    <div class="layui-inline" >
						      <div class="layui-input-inline" style="width: 80px;">
						        <select class="groupMsg_time_unit" name="timeItem"  lay-filter="groupMsg_time_unit">
								        <option value="1">月</option>
								        <option value="2" selected>天</option>
								        <option value="3">小时</option>
								        <option value="4">分钟</option>
							     </select>
						      </div>
					    </div>
					 </div>
					</div>
		        </div>
		        <div class="layui-card-body">
		          <div class="layui-row">
		          
		            <div class="layui-col-sm12">
		                <div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-pagetwo" lay-anim="fade" style="width: 100%;">
		                  	<div id="groupMsgCount"  style="width: 650px; height: 350px;"></div>
		                </div>
		            </div>
		            
		          </div>
		        </div>
		      </div>
		    </div>

		</div>

	<div class="layui-row">
		<!-- <div class="layui-fluid"> -->
			<!-- <div class="layui-row layui-col-space15"> -->
				<div class="layui-col-md1">&nbsp;</div>
				<input id="save_roomId" type="" name="" style="display: none">
				<div id="roomList" style="padding: 0px 13px 0px 13px;">
					<div class="room_btn_div" style="margin-top: 2%">
						<input  type="text" name="" class="layui-input group_name" style="width: 15%;display: inline" placeholder="群组名称">
						<input  type="text" name="" class="layui-input leastNumbers" style="width: 15%;display: inline" placeholder="显示超出此人数的群组">
						<form class="layui-form group_type" action="" style="display: inline-block;">
							<div class="layui-form-item roomStatus">
								<select id="status" class="layui-select">
									<option value="">请选择群组类型</option>
									<option value="0">公开群组</option>
									<option value="1">私密</option>
								</select>
							</div>
						</form>
						<button  class="layui-btn search_group">搜索</button>
						<button onclick="Room.addRoom()" class="layui-btn btn_addRoom room-add">新增群组</button>
						<input type="text" name="" class="layui-input keyWord" style="width: 15%;display: none;margin-left: -129px;" placeholder="关键词">
						<button  class="layui-btn search_keyWord" style="display: none">搜索</button>
						<button  class="layui-btn deleteMonthLogs" style="display: none">删除一个月之前的所有聊天记录</button>
						<button  class="layui-btn deleteThousandAgoLogs" style="display: none">删除十万条之前的所有聊天记录</button>
						
					</div>
					<div id="room_table_div" class="layui-card" style="margin-top: 1%">
						<div class="layui-card-header"><p>群组列表</p></div>
						<div class="layui-card-body">
							<table id="room_table" lay-filter="room_table"></table>
						</div>
					</div>
					<!--<div id="room_table_div" class="layui-card" style="margin-top: 2%; background-color: #f2f2f2">
						<table id="room_table" lay-filter="room_table"></table>
					</div> -->

					<!-- 群组消息模块 -->
					<div id="roomMsgList" class="layui-card" style="margin-top:1%;display: none">
				    	<div class="layui-card-header">群组消息</div>
						<div class="layui-card-body">
							<table id="room_msg" lay-filter="room_msg" >
							</table>
							<button onclick="Room.button_back()" class="layui-btn layui-btn-primary layui-btn-sm" style="">&lt;&lt;返回</button>
						</div>
					</div>

					<!-- 成员管理 -->
					<div id="roomUserList" class="layui-card" style="margin-top:1%;display: none">
				    	<div class="layui-card-header">成员管理</div>
						<div class="layui-card-body">
							<table id="room_user" lay-filter="room_user">
								
							</table>
							
							<button onclick="Room.button_back()" class="layui-btn layui-btn-primary layui-btn-sm" style="">&lt;&lt;返回</button>
						</div>
					</div>
					<!-- 群发消息 -->
					<div id="pushToRoom" class="layui-card" style="display: none">
						<div class="layui-card-header">发送消息</div>
						<div class="layui-card-body">
							<table cellspacing="0" cellpadding="0" border="0" class="layui-table">
								<tr>
									<td>群组JId</td>
									<td><input id="push_roomJid" type="text" class="layui-input" readonly="true"></td>
								</tr>
								<tr>
									<td>发送者</td>
									<td>
										<select id="push_sender" class="layui-select">
											
										</select>
									</td>
								</tr>
								<tr>
									<td>消息内容</td>
									<td>
										<textarea id="push_context" class="layui-textarea" placeholder="请输入内容"></textarea>
									</td>
								</tr>
							</table>
							<button onclick="Room.commit_push()" class="layui-btn">发送</button>
							<button onclick="Room.button_back()" class="layui-btn layui-btn-primary layui-btn-sm" style="">&lt;&lt;返回</button>
						</div>
					</div>
					<!-- 随机添加用户 -->
					<div id="addRandomUser" class="layui-card" style="display: none">
						<div class="layui-card-header">随机添加用户</div>
						<div class="layui-card-body">
							<table cellspacing="0" cellpadding="0" border="0" class="layui-table">
								<tr>
									<td>群组Id</td>
									<td><p id="roomId"></p></td>
								</tr>
								<tr>
									<td>添加用户数量</td>
									<td><input id="addRandomUserSum" type="" onkeyup="value=value.replace(/[^\d]/g,'')" class="layui-input" placeholder="请输入添加数量"></td>
								</tr>
							</table>
							<button onclick="Room.commit_addRandomUser()" class="layui-btn" style="margin-top: 1%">提交</button>
							<button onclick="Room.button_back()" class="layui-btn layui-btn-primary layui-btn-sm" style="margin-top: 1%">&lt;&lt;返回</button>
						</div>
					</div>
					<!-- 修改群详情 -->
					<div id="updateRoom" class="layui-card" style="display: none">
						<div class="layui-card-header">修改群详情</div>
						<!--<div class="layui-card-body">-->
						<form class="layui-form" action="">
							<table cellspacing="0" cellpadding="0" border="0" class="layui-table">
								<tr>
									<td width="50%">群组Id
										<br/>
										<span class="cluster_style">群组Id</span></td>
									</td>
									<td id="update_roomId"></td>
								</tr>

								<tr>
									<td>群组Jid
										<br/>
										<span class="cluster_style">群组Jid</span></td></td>
									<td id="update_roomJid"></td>
								</tr>
								<tr>
									<td>群组名称
										<br/>
										<span class="cluster_style">群组名称</span></td>
									</td>
									<td>
										<input id="name" type="text" class="layui-input">
										<input id="updateRoom_id" type="text" name="" style="display: none;">
									</td>
								</tr>
								<tr>
									<td>群组描述
										<br/>
										<span class="cluster_style">群组描述信息</span></td>
									</td>
									<td><input id="desc" type="text" class="layui-input"></td>
								</tr>
								<tr>
									<td>群组最大人数
										<br/>
										<span class="cluster_style">设置当前最大群成员人数</span></td>
									<td><input id="maxUserSize" type="text" class="layui-input"></td>
								</tr>
								<tr>
									<td>管理员最大人数
										<br/>
										<span class="cluster_style">设置当前最大群管理员人数</span></td>
									<td><input id="adminMaxNumber" type="text" class="layui-input"></td>
								</tr>
								<tr>
									<td>私密群组
										<br/>
										<span class="cluster_style">启动私密群后，无法被搜索到当前群组</span>
									</td>
									<td>
										<select id="isLook" class="layui-select" style="width: 50%" lay-filter="test">
											<option value="0">公开群</option>
											<option value="1">隐私群</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>显示已读人数
										<br/>
										<span class="cluster_style">启用后，当前群主的消息页面每条消息左侧都会显示该条消息的已读人数，点击可查看已读人员列表</span>
									</td>
									<td>
										<select id="showRead" class="layui-select" lay-filter="test">
											<option value="0">关闭</option>
											<option value="1">开启</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>群组邀请确认
										<br/>
										<span class="cluster_style">启动后，群成员需群主确认才能邀请朋友进群</span>
									</td>
									<td>
										<select id="isNeedVerify" class="layui-select" lay-filter="test">
											<option value="0">关闭</option>
											<option value="1">开启</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>群组减员通知
										<br/>
										<span class="cluster_style">关闭后，当群内成员被踢出群组或主动退群时，群组内不进行通知</span>
									</td>
									<td>
										<select id="isAttritionNotice" class="layui-select" lay-filter="test">
											<option value="0">关闭</option>
											<option value="1">开启</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>允许显示群成员
										<br/>
										<span class="cluster_style">关闭后，普通成员在群组信息内将看不到其他成员在群聊界面,群组信息内点击头像无反应</span>
									</td>
									<td>
										<select id="showMember" class="layui-select" lay-filter="test">
											<option value="1">开启</option>
											<option value="0">关闭</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>允许群成员私聊
										<br/>
										<span class="cluster_style">关闭后，不允许发送名片消息，且普通成员在群聊界面，群组信息内点击头像无反应</span>
									</td>
									<td>
										<select id="allowSendCard" class="layui-select" lay-filter="test">
											<option value="1">开启</option>
											<option value="0">关闭</option>
										</select>
									</td>
								</tr>
								<!--<tr>
									<td>允许群主修改属性</td>
									<td>
										<select id="allowHostUpdate" class="layui-select" lay-filter="test">
											<option value="1">开启</option>
											<option value="0">关闭</option>
										</select>
									</td>
								</tr>-->
								<tr>
									<td>允许普通成员邀请好友
										<br/>
										<span class="cluster_style">关闭后，普通成员将不能使用邀请功能</span></td>
									<td>
										<select id="allowInviteFriend" class="layui-select" lay-filter="test">
											<option value="1">开启</option>
											<option value="0">关闭</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>允许普通成员上传
										<br/>
										<span class="cluster_style">关闭后，普通成员将不能上传群共享文件和发送文件消息</span></td></td>
									<td>
										<select id="allowUploadFile" class="layui-select" lay-filter="test">
											<option value="1">开启</option>
											<option value="0">关闭</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>允许普通成员发起会议
										<br/>
										<span class="cluster_style">关闭后，普通成员将不能主动发起语音会议和视频会议</span></td>
									</td>
									<td>
										<select id="allowConference" class="layui-select" lay-filter="test">
											<option value="1">开启</option>
											<option value="0">关闭</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>允许普通成员发起讲课
										<br/>
										<span class="cluster_style">关闭后，普通成员将不能在该群内发送Ta的课件</span></td></td>
									</td>
									<td>
										<select id="allowSpeakCourse" class="layui-select" lay-filter="test">
											<option value="1">开启</option>
											<option value="0">关闭</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>撤回消息后的保留时长
										<br/>
										<span class="cluster_style">撤回后的消息保留时间，0表示不保留，单位：秒</span></td>
									<td><input id="withdrawTime" type="text" class="layui-input"></td>
								</tr>
								<tr>
									<td>群组网站
										<br/>
										<span class="cluster_style">设置展示的网址，配置示例:[{"name":"标题1","url":"网址1"},{"name":"标题2","url":"网址2"}]
											注:最多配置四个网址,取消展示则设为[{}]即可.</span></td>
									<td><input id="roomTitleUrl" type="text" class="layui-input"></td>
								</tr>

							</table>
						</form>
						<button onclick="Room.button_back()" class="layui-btn layui-btn-primary layui-btn-sm" style="">&lt;&lt;返回</button>
					</div>
				</div>

				<!-- 新增群组模块 -->
				<div id="addRoom" class="layui-card" style="display: none;">
					<div class="layui-card" style="margin-top: 1%">
						<div class="layui-card-header">新增群组</div>
						<div class="layui-card-body">
							<table cellspacing="0" cellpadding="0" border="0" class="layui-table">
								<!-- <tr>
									<td>群组信息</td>
								</tr> -->
								<tr>
									<td>群名称</td>
									<td><input id="add_roomName" type="text" name="" class="layui-input" placeholder="请输入群组名称"></td>
								</tr>
								<tr>
									<td>房间说明</td>
									<td><input id="add_desc" type="text" name="" class="layui-input" placeholder="请输入房间说明"></td>
								</tr>
							</table>
							<button onclick="Room.commit_addRoom()" class="layui-btn">新增</button>
							<button onclick="Room.button_back()" class="layui-btn layui-btn-primary layui-btn-sm" style="">&lt;&lt;返回</button>
						</div>
					</div>
				</div>
				
			</div>
	</div>

		<input id="roomList_limlt" value="15" type="hidden">

	<!--操作-->
	<script type="text/html" id="roomListBar">
		<a class="layui-btn layui-btn-primary layui-btn-xs chatRecord room-chatRecord" lay-event="chatRecord">聊天记录</a>
		<a class="layui-btn layui-btn-primary layui-btn-xs member room-member " lay-event="member">成员管理</a>
		<a class="layui-btn layui-btn-primary layui-btn-xs randUser room-randUser" lay-event="randUser">添加机器人</a>
	    <a class="layui-btn layui-btn-primary layui-btn-xs modifyConf room-modifyConf" lay-event="modifyConf">修改配置</a>
        <a class="layui-btn layui-btn-primary  layui-btn-xs msgCount room-msgCount" lay-event="msgCount">消息统计</a>
        <a class="layui-btn layui-btn-primary layui-btn-xs sendMsg room-sendMsg" lay-event="sendMsg">发送消息</a>
		{{#  if(d.s == 1){ }}
		<a class="layui-btn layui-btn-primary layui-btn-xs locking room-locking" lay-event="locking">封群</a>
		{{#  }else{  }}
		<a class="layui-btn layui-btn-primary layui-btn-xs cancelLocking room-locking" lay-event="cancelLocking">解封</a>
		{{#  } }}
       	<a class="layui-btn layui-btn-xs layui-btn-danger del room-delete" lay-event="del">删除</a>
	</script>

	<script type="text/html" id="roomMemberListBar">
		<a class="layui-btn layui-btn-danger layui-btn-xs deleteMember" lay-event="deleteMember">移出</a>
	</script>

	<script type="text/html" id="roomMessageListBar">
		<a class="layui-btn layui-btn-danger layui-btn-xs deleteMessage" lay-event="deleteMessage">删除</a>
	</script>
	<!--多选删除群组-->
	<script type="text/html" id="toolbarGroupMessageList">
		<div class="layui-btn-container">
			<button class="layui-btn layui-btn-sm groupChatdelete" onclick="Room.toolbarGroupMessageList()" lay-event="GroupChatdelete">多选删除</button>
		</div>
	</script>
	<script type="text/html" id="toolbarMembers">
		<div class="layui-btn-container">
			<!--多选移出群成员-->
			<button class="layui-btn layui-btn-sm checkDeleteUsersFriends" onclick="Room.toolbarMembers()" lay-event="GroupChatdelete">多选移出群成员</button>
			<!--多选删除群成员-->
			<button class="layui-btn layui-btn-sm checkDeleteMember" onclick="Room.toolbarDeleteMembers()" lay-event="GroupChatdeleteMember">多选注销群成员</button>
			<!--群成员导出-->
			<button class="layui-btn layui-btn-sm exportFriends" onclick="Room.exprotExcelByMember()" lay-event="GroupChatdelete">导出群成员</button>
			<!--邀请加入群组-->
			<button class="layui-btn layui-btn-sm inviteJoinRoom" onclick="Room.inviteJoinRoom()" lay-event="inviteJoinRoom">邀请加入群组</button>
		</div>
	</script>
<script type="text/javascript" src="/pages/common/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/pages/console/assets/xss-filters.1.2.7.min.js"></script>
<script type="text/javascript" src="/pages/common/layui/layui.all.js"></script>
<script type="text/javascript" src="/pages/assets/js/jquery.md5.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<!-- 加解密 -->
<script type="text/javascript" src="./js/encrypt/crypto-js.js"></script>
<script type="text/javascript" src="./js/encrypt/encryptUtils.js"></script>
<script type="text/javascript" src="./js/count.js"></script>
<script type="text/javascript" src="/pages/common/echarts/echarts.min.js"></script>
<script type="text/javascript" src="/pages/common/echarts/shine.js"></script>
<script type="text/javascript" src="./js/count.js"></script>
<script type="text/javascript" src="./js/console_ui.js"></script>
<script type="text/javascript" src="/pages/console/js/authorityManagement.js"></script>
<script type="text/javascript" src="./js/roomList.js"></script>


</body>
</html>